package com.example.demo.yzy.vo;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;

/**
* @description: TODO
* @author 杨镇宇
* @date 2022/4/12 18:19
* @version 1.0
*/

public class DemoVo {
    @NotEmpty(message ="手机号不能为空")
    @Pattern(regexp = "^((13[0-9])|(14[5,7,9])|(15[^4])|(18[0-9])|(17[0,1,3,5,6,7,8]))[0-9]{8}$", message = "手机号不合法")
    private String phone;
    @Min(value = 1, message = "业务类型(1-注册/2-身份验证/3-通知)")
    @Max(value = 3, message = "业务类型(1-注册/2-身份验证/3-通知)")
    private Integer type;

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }
}
